<blocks app="Snap! 6.0 beta, https://snap.berkeley.edu" version="1"><block-definition s="$camera snap" type="reporter" category="sensing"><comment x="0" y="0" w="216" collapsed="false">takes a snapshot with the webcam and reports it as a new costume, or zero if the user cancels</comment><header></header><code></code><translations>pt:$camera a imagem actual do vídeo&#xD;</translations><inputs></inputs><script><block s="doDeclareVariables"><list><l>test</l><l>pic</l></list></block><block s="doSetVar"><l>test</l><block s="evaluate"><block s="reportJSFunction"><list></list><l>var camDialog,&#xD;    result = false;&#xD;&#xD;camDialog = new CamSnapshotDialogMorph(&#xD;    this.parentThatIsA(IDE_Morph),&#xD;    this,&#xD;    function () {result = null; },&#xD;    function (costume) {&#xD;        result = costume;&#xD;        this.close();&#xD;    }&#xD;);&#xD;&#xD;camDialog.key = &apos;camera&apos;;&#xD;camDialog.popUp(this.world());&#xD;return function () {return result; };</l></block><list></list></block></block><block s="doWaitUntil"><block s="evaluate"><block s="reifyScript"><script><block s="doSetVar"><l>pic</l><block s="evaluate"><block var="test"/><list></list></block></block><block s="doReport"><block s="reportNot"><block s="reportEquals"><block var="pic"/><block s="reportBoolean"><l><bool>false</bool></l></block></block></block></block></script><list></list></block><list></list></block></block><block s="doReport"><block var="pic"/></block></script></block-definition></blocks>